Communication apparatus that provides a communication parameter and method of controlling the same

ABSTRACT

In order to enable a reduction in complexity in setting a communication parameter, a communication apparatus operable to provide a communication parameter to an external apparatus, generates a first image that is used in a first setting scheme for providing a communication parameter and in which information including a communication parameter is encoded; and generates a second image that is used in a second setting scheme for providing a communication parameter and in which information that does not include the communication parameter and that does include authentication information for performing an authentication is encoded. Then, the apparatus accepts information used to determine which of the first setting scheme and the second setting scheme to use; and, displays, based on the information, either the first image or the second image.

BACKGROUND OF THE INVENTION Field of the Invention

The present invention relates to a technique for parameter setting in acommunication apparatus.

Description of the Related Art

In recent years, there is an increasing number of cases in which awireless communication function is installed in electric devices such asa digital camera, a printer, a portable phone/smart phone or the likeand such devices are connected to a wireless network and used as acommunication apparatus. To connect the electric device to a wirelessnetwork, it is necessary to set various communication parameters such asan encryption scheme, an encryption key, an authentication scheme, anauthentication key, or the like. Accordingly, communication parametersetting is complicated, and there is a high threshold for the user of adigital camera or printer. Thus, mechanisms for simplifyingcommunication parameter setting are used. Furthermore, to preventcommunication parameter information leakage or the like, a mechanism isused in which a user terminal is notified of communication parametersencrypted by using a public key encryption scheme.

Japanese Patent Laid-Open No. 2006-261938 discloses a technique in whichby using a QR code (registered trademark) image including information ofcommunication parameters, communication parameter setting in acommunication terminal is simplified. Also, Wi-Fi (registered trademark)Alliance is investigating a DPP scheme in which information of a publickey is provided to a communication terminal via a QR code image or thelike, and communication parameters are provided to a communicationterminal connected by a communication channel for which the public keyis used. DPP is an abbreviation of Device Provisioning Protocol.

However, in a case where there are multiple setting schemes forcommunication parameters using a QR code image, a QR code image ends upbeing displayed for every one of the schemes. For example, in acommunication apparatus that supports two setting schemes, two QR codeimages end up being displayed. For that reason, the user ends up beingconfused as to which QR code image they should capture.

SUMMARY OF THE INVENTION

According to one aspect of the present invention, a communicationapparatus operable to provide a communication parameter to an externalapparatus, comprises: a first generation unit configured to generate afirst image that is used in a first setting scheme for providing acommunication parameter and in which information including acommunication parameter is encoded; a second generation unit configuredto generate a second image that is used in a second setting scheme forproviding a communication parameter and in which information that doesnot include the communication parameter and that does includeauthentication information for performing an authentication is encoded;an acceptance unit configured to accept information used to determinewhich of the first setting scheme and the second setting scheme to use;and a display unit configured to, based on the information accepted bythe acceptance unit, display either the first image or the second image.

The present invention provides a technique that enables reduction ofcomplexity in communication parameter setting.

Further features of the present invention will become apparent from thefollowing description of exemplary embodiments (with reference to theattached drawings).

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings, which are incorporated in and constitute apart of the specification, illustrate embodiments of the invention and,together with the description, serve to explain the principles of theinvention.

FIG. 1 is a view illustrating an overall configuration of acommunication system according to a first embodiment.

FIG. 2 is a block diagram illustrating a functional configuration of aprinter.

FIG. 3 is a flowchart of QR code image display processing in the firstembodiment.

FIG. 4 is a view illustrating an example of a setting scheme selectionscreen.

FIG. 5 is a sequence diagram illustrating setting processing in a legacyscheme.

FIG. 6 is a sequence diagram illustrating setting processing in a DPPscheme.

FIG. 7 is a flowchart of other QR code image display processing.

FIG. 8 is a view illustrating an example of an OS version selectionscreen.

FIG. 9 is a flowchart of QR code image display processing in a secondembodiment.

DESCRIPTION OF THE EMBODIMENTS

Explanation is given in detail below, with reference to the drawings, ofexamples of embodiments of the invention. Note, the followingembodiments are only examples and are not intended to limit the scope ofpresent invention.

First Embodiment

As a first embodiment of a communication apparatus according to thepresent invention, an example will be described below of a printer thatforms a network based on wireless LAN conforming to the IEEE 802.11series and accepts a wireless connection from a mobile device.

<System Configuration and an Apparatus Configuration>

FIG. 1 is a view illustrating an overall configuration of acommunication system according to a first embodiment. The communicationsystem includes a printer 101 that forms a wireless network 103 and amobile device 102 that connects to the wireless network 103.

The printer 101 has a wireless LAN function, and operates as aconfigurator or an access point as specified in DPP, for example. Theprinter 101 can form the wireless network 103 as an access point. Also,it can provide communication parameters for connecting to the wirelessnetwork 103 that it forms itself as the configurator. Here, in thecommunication parameters, setting items necessary for performingwireless communication such as an SSID (Service Set Identifier) as anetwork identifier, an encryption scheme, an encryption key, and anauthentication scheme are included. The printer 101 can generate a codeimage in which communication parameters are encoded and a code image inwhich a public key that is used in DPP is encoded. In the followingdescription, use of a QR code image as a code image is envisioned.

The mobile device 102 has a wireless LAN function and operates as anenrollee as specified in DPP, for example. Also, the mobile device 102has a camera and can capture the surroundings of the mobile device 102.Here, it is envisioned that in the mobile device 102, a setting app forsetting parameters of the wireless LAN of the mobile device 102 isinstalled, and the setting app controls the camera to capture thesurroundings. The mobile device 102, by capturing a QR code image thatthe printer 101 displays with a camera, can obtain encoded information,in other words communication parameters for connecting to the wirelessnetwork 103 and a public key used in DPP.

Note that in the following description, description is given using aprinter as a device for forming a wireless network and a mobile deviceas a device that connects to the wireless network, but limitation is notmade to this. In other words, any communication apparatus having awireless network function may be used and it need not be portable. Also,a communication apparatus such as a portable phone, a digital camera, avideo camera, a PC, a PDA, a smart phone, or a smart watch can be usedas the mobile device, but limitation is not made to these.

FIG. 2 is a block diagram illustrating a functional configuration of theprinter 101. Here, it is envisioned that each functional unit isrealized by a computer (processor) executing a program stored in thememory. However, some or all of the respective functions may be realizedby dedicated hardware.

A wireless communication control unit 201 controls communication thatuses an antenna and circuitry or the like for performingtransmission/reception of wireless signals with another wirelessapparatus via a wireless LAN. A transmission/reception unit 202 performscontrol to transmit/receive data according to a protocol of eachcommunication layer.

An operation unit 203 accepts operations for the printer 101 from auser. A button for starting processing for connecting to a wirelessnetwork and the like is included in the operation unit 203. Note thatthe operation unit 203 may be configured by hardware (physical buttons,switches, and the like) and may be configured by a UI provided bysoftware using a display unit 204. The display unit 204 outputsinformation that can be recognized visually/aurally, such as an LCD, anLED, or a speaker, and makes notifications of various information to theuser.

A control unit 205 is configured by one or more processors such as aCPU, and controls the printer 101 as a whole. A storage unit 206comprises one or more ROMs in which programs and data for controllingthe printer 101 are stored and one or more RAMs for performing temporarystorage. Various operations of later-described flowcharts are realizedby executing control programs stored in the storage unit 206 to controlrespective functional units.

A code generation unit 207 generates a QR code image. Note that a QRcode image is used as an image for code information, but a barcodeimage, another two-dimensional code image, or the like may be used.

A scheme determination unit 208 determines a setting scheme that a userselected via the operation unit 203. Here, the setting scheme means ascheme for providing wireless LAN parameters to an external device (forexample, the mobile device 102). Here, a “legacy scheme” and a “DPPscheme” are envisioned to be available as setting schemes.

Here, the legacy scheme is a scheme that allows connection by providingto an external device a QR code image obtained by encoding informationincluding communication parameters. Also, the DPP scheme is a schemethat allows connection by providing to an external device a QR codeimage obtained by encoding information including a public key (specificto the printer 101) that is related to the printer 101. Specifically,the external device transmits an authentication request to the printer101 using the obtained public key, and receives communication parametersfrom the printer 101 via an encrypted communication channel. In otherwords, the public key included in the QR code image is used asauthentication information for performing authentication.

Note that another setting scheme may be used. For example, a scheme thatallows connection by providing to an external device a QR code imageobtained by encoding information necessary for connection in Wi-FiDirect (registered trademark) or the like may be used.

A communication parameter processing unit 209 performs processing forproviding communication parameters for connecting to the wirelessnetwork 103. An IP address processing unit 210 performs processing forsetting the IP address of the printer 101 itself and processing fordistributing the IP address to the mobile device 102 that connects tothe wireless network 103.

Note that the respective role assignments of each of the above-describedfunctional units are mere examples. Two or more of the above-describedfunctional units may be configured as one functional unit, and one ofthe above-described functional units may be configured as two or morefunctional units.

<Apparatus Operation>

FIG. 3 is a flowchart of QR code image display processing in the firstembodiment. Specifically, it is processing in which the printer 101,which provides communication parameters, displays a QR code image basedon a setting scheme that a user selected. The processing of FIG. 3 isstarted when the printer 101 accepts an instruction to start processingfor connecting to a wireless network from a user via the operation unit203. Note that in the first embodiment, description is given of a casewhere when the mobile device 102 starts setting of communicationparameters, the printer 101 has not yet formed the wireless network 103.

In step S301, the printer 101 confirms that a button for startingprocessing for connecting to the wireless network was pressed by a user.When the start instruction from the user is confirmed, the processingadvances to step S302.

In step S302, the printer 101 controls the IP address processing unit210 and sets the IP address to the printer 101 itself. Here, somethingset in advance by the user may be used for the IP address, and somethingthat the printer 101 autonomously decided may be used.

In step S303, the printer 101 controls the wireless communicationcontrol unit 201 to form the wireless network 103, and start operationas an access point. Note that the operation as an access point in stepS303 includes starting operation as a P2P Group Owner in a case whereWi-Fi Direct is executed. Here, for parameters for the wireless network103 such as an SSID (Service Set Identifier), an encryption scheme, anencryption key, and an authentication scheme, parameters that are set inadvance by the user may be used, and parameters that the printer 101decides autonomously may be used.

In step S304, the printer 101 controls the code generation unit 207 togenerate a QR code image for the legacy scheme. In step S305, theprinter 101 controls the code generation unit 207 to generate a QR codeimage for the DPP scheme. Note that the order of execution of step S304and step S305 may be reversed. Furthermore, configuration may be takenso that the QR code image is generated after the determinationprocessing in later-described step S307.

In step S306, the printer 101 controls the display unit 204 to display aselection screen for accepting from the user which of the legacy schemeand the DPP scheme to allow connection by. The screen 400 a illustratedin FIG. 4 is a view that illustrates an example of a screen forselecting a setting scheme displayed on the display unit 204.

In step S307, the printer 101 determines which of the legacy scheme andthe DPP scheme was selected on the selection screen. In a case where theDPP scheme was determined to be selected (YES in step S307), theprocessing advances to step S308, and in the case where the legacyscheme was determined to be selected (NO in step S307), the processingadvances to step S309.

In step S308, the printer 101 controls the display unit 204 and displayson the display unit 204 the QR code image for the DPP scheme generatedin step S305. Meanwhile, in step S309, the printer 101 controls thedisplay unit 204 and displays on the display unit 204 the QR code imagefor the legacy scheme generated in step S304.

By the foregoing processing, only one QR code image ends up beingdisplayed on the display unit 204 of the printer 101. Accordingly, theuser of the mobile device 102 can perform communication parametersetting on the mobile device 102 by capturing the one displayed QR codeimage by using the mobile device 102.

Note that configuration may be taken such that in the case where a QRcode image is generated after the determination processing in step S307,only the QR code image for the determined scheme is generated. By this,it becomes possible to reduce the processing load for generating the QRcode image since it is possible to reduce the number of QR code imagesthat are generated.

FIG. 5 is a sequence diagram illustrating setting processing in a legacyscheme. Specifically, it illustrates processing in which the userselects the legacy scheme, the printer 101 displays the QR code imagefor the legacy scheme, and the mobile device 102 obtains communicationparameters based on the legacy scheme, and connects to the wirelessnetwork 103.

The printer 101, when it confirms (step S501) that the button forstarting processing for connecting to the wireless network was pressedby the user, sets (step S502) the IP address to the printer 101 itself,and forms (step S503) the wireless network 103.

After forming the wireless network 103, the printer 101 generates the QRcode image for the legacy scheme and the QR code image for the DPPscheme (step S504 and step S505). After that, the printer 101 displays(step S506) a selection screen (screen 400 a) for allowing the user toselect which of the legacy scheme and the DPP scheme to connect by.

After displaying the selection screen, the printer 101 awaits theselection of the scheme by the user, determines (step S507) that thelegacy scheme was selected by the user, and displays (step S508) the QRcode image for the legacy scheme.

Meanwhile, when the mobile device 102 receives an instruction to connectto the wireless network 103 from the user, it activates (step S509) animage capturing unit such as a camera for capturing the QR code image.For example, when activation of a setting app is instructed by a user,the setting app activates a camera, and controls the camera inaccordance with user operations to start capturing.

The user directs the imaging direction of the camera of the mobiledevice 102 towards the QR code image displayed on the printer 101 instep S508. The mobile device 102 decrypts (step S510) the QR code imagewhen the QR code image is captured. The communication parameters forconnecting to the wireless network 103 are included in the informationthat the QR code image decrypted in step S510 indicates.

The mobile device 102, by setting to the mobile device 102 itself thecommunication parameters obtained by decryption in step S510, connects(step S511) to the wireless network 103.

FIG. 6 is a sequence diagram illustrating setting processing in the DPPscheme. Specifically, it illustrates processing in which the userselects the DPP scheme, the printer 101 displays the QR code image forthe DPP scheme, and the mobile device 102 obtains communicationparameters based on the DPP scheme, and connects to the wireless network103.

The printer 101, when it confirms (step S601) that the button forstarting processing for connecting to the wireless network was pressedby the user, sets (step S602) the IP address to the printer 101 itself,and forms (step S603) the wireless network 103.

After forming the wireless network 103, the printer 101 generates the QRcode image for the legacy scheme and the QR code image for the DPPscheme (step S604 and step S605). After that, the printer 101 displays(step S606) a selection screen (screen 400 a) for allowing the user toselect which of the legacy scheme and the DPP scheme to connect by.

After displaying the selection screen, the printer 101 awaits theselection of the scheme by the user, determines (step S607) that the DPPscheme was selected by the user, and displays (step S608) the QR codeimage for the DPP scheme.

Meanwhile, when the mobile device 102 receives an instruction to connectto the wireless network 103 from the user, it activates (step S609) animage capturing unit such as a camera for capturing the QR code image.For example, when activation of a setting app is instructed by a user,the setting app activates a camera, and controls the camera inaccordance with user operations to start capturing.

The user directs the imaging direction of the camera of the mobiledevice 102 towards the QR code image displayed on the printer 101 instep S608. The mobile device 102 decrypts (step S610) the QR code imagewhen the QR code image is captured. Communication parameters forconnecting to the wireless network 103 are not included in theinformation indicated by the QR code image that was decrypted in stepS610, and a public key of the printer 101 to be used in the DPP schemeis included therein. The public key can be used for authenticating theprinter 101 and encrypting the communication channel when providing thecommunication parameters.

The mobile device 102, after having obtained the public key of theprinter 101, transmits (step S611) to the printer 101 an authenticationrequest including a hash value of the public key of the printer 101 andthe public key of the mobile device 102 itself.

The printer 101, after having received the authentication request,determines whether or not the apparatus that transmitted theauthentication request is an apparatus that captured the QR code image.Here, a hash value of the public key included in the QR code imagegenerated in step S605 is calculated. Then, the calculated hash valueand the hash value included in the authentication request received instep S611 are compared. Then, in the case where the two match, themobile device 102 that transmitted the authentication request isauthenticated as an apparatus that captured the QR code image. Afterthat, the printer 101 transmits (step S612) an authentication responseindicating that the mobile device 102 was authenticated as an apparatusthat captured the QR code image.

The mobile device 102, after having received the authentication responsein step S612, confirms that it was authenticated by the printer 101, andtransmits (step S613) an authentication confirmation to the printer 101.

The printer 101, after having received the authentication confirmation,generates a shared key using both the public key of the mobile device102 received in step S611 and the private key of the printer 101 itself.Meanwhile, the mobile device 102, after having transmitted theauthentication confirmation, generates a shared key using both thepublic key of the printer 101 obtained in step S610 and the private keyof the mobile device 102 itself. Here, the shared key is envisioned asbeing generated based on ECDH (Elliptic Curve Diffie-Hellman), forexample, but it may be generated based on another public key encryptionscheme.

The printer 101 transmits (step S614) to the mobile device 102 thecommunication parameters after they are encrypted using the generatedshared key. In other words, the communication parameters are transmittedvia a communication channel that was encrypted using the generatedshared key. Meanwhile, the mobile device 102 uses the generated sharedkey to decrypt the encrypted communication parameters. In other words,the communication parameters are received via a communication channelthat was encrypted using the generated shared key.

The mobile device 102, by setting to the mobile device 102 itself thecommunication parameters obtained by decryption in step S614, connects(step S615) to the wireless network 103.

By virtue of the first embodiment as described above, the printer 101selectively displays the QR code corresponding to the setting schemethat was designated by the user. Accordingly, without confusion, theuser of the mobile device 102 can perform communication parametersetting on the mobile device 102 by capturing the single displayed QRcode image by using the mobile device 102.

<Another Example of Selection Screen>

In step S306 described above, a selection screen (screen 400 a) on whichthe user directly designates (selects) either “legacy scheme” or “DPPscheme” is displayed. However, configuration may be taken so as toaccept information that is easy for the user to understand as thecontent accepted for the setting scheme. For example, configuration maynarrow down the QR code image to be displayed to one according to afunction that the mobile device 102 comprises. In the followingdescription, a case in which the QR code image to display is selecteddepending on the version of the OS (Operating System) of the mobiledevice 102 as an example of a function that the mobile device 102comprises will be described.

The OS of the mobile device 102 may be Android (registered trademark),for example. In the case where the version of the OS is old, there isthe possibility that the mobile device 102 does not support the DPPsetting scheme which is a relatively new scheme compared to the legacyscheme. In this case, even if the mobile device 102 captures the QR codeimage for the DPP scheme, it cannot connect to the wireless network 103.Accordingly, description is given of an embodiment in which the QR codeimage to be displayed is narrowed down to one based on the version ofthe OS installed in the mobile device 102.

FIG. 7 is a flowchart of other QR code image display processing.Specifically, it is a flowchart that illustrates processing in which theQR code image to be displayed is narrowed down to one based on theversion of the OS installed in the mobile device 102. The processing ofstep S701 to step S705 is similar to that of FIG. 3 (step S301 to stepS305), and so description is omitted.

In step S706, the printer 101 controls the display unit 204 to display aselection screen for allowing the user to select the version of the OSinstalled in the mobile device 102. FIG. 8 is the view for illustratingan example of a selection screen 800 of the OS version displayed on thedisplay unit 204. The “X.X” in “AndroidX.X” is the version number, and anumber such as “4.3” or “6.2”, for example, is set in advance. Note thatin the selection screen 800, a screen configuration is such that itaccepts whether it is a preset version or higher, but it is alsopossible to use another screen configuration. For example, configurationmay be such that the OS version is accepted via a numeric keypad or thelike, and configuration may be taken such that the printer 101determines whether or not the accepted OS version is a preset version orhigher.

In step S707, the printer 101 determines which of “Android X.X orhigher” and “less than Android X.X” was selected on the selectionscreen. In the case where “Android X.X or higher” is determined to beselected (YES in 707), the processing advances to step S708, and in thecase where “less than Android X.X” is determined to be selected (NO in707) the processing advances to step S709.

In step S708, the printer 101 controls the display unit 204 and displayson the display unit 204 the QR code image for the DPP scheme generatedin step S705. Meanwhile, in step S709, the printer 101 controls thedisplay unit 204 and displays on the display unit 204 the QR code imagefor the legacy scheme generated in step S704.

Note that, similarly to the case of the processing in FIG. 3 ,configuration may be taken to generate the QR code image after thedetermination processing in step S707 without generating the QR codeimages in step S704 and in step S705. Also, description was given usingAndroid as the OS installed on the mobile device 102, but limitation isnot made to this. For example, it may be Apple's (registered trademark)iOS.

Furthermore, the version of the setting app may be used in place of theOS version, and a combination of the OS version and the setting appversion may be used. It is possible to display arbitrary functioninformation by which the setting scheme can be specified as theselection screen (FIG. 8 ).

Second Embodiment

In the second embodiment, description is given of a case where when themobile device 102 starts setting of communication parameters, theprinter 101 has already formed the wireless network 103. For example,this is a state in the case where the mobile device 102, after havingconnected to the printer 101 in accordance with FIG. 5 or FIG. 6 , firstdisconnects and then reconnects, a case where another mobile devicenewly connects, or the like.

The system configuration and apparatus configuration are similar to inthe first embodiment (FIG. 1 and FIG. 2 ), and therefore descriptionthereof is omitted. However, the scheme determination unit 208, inaddition to determining the setting scheme described in the firstembodiment, further has a function for determining what setting schemethe QR code image that displayed when the wireless network 103 wasformed was for.

<Apparatus Operation>

FIG. 9 is a flowchart of QR code image display processing in a secondembodiment. The processing of step S901 and step S903 to step S910 issimilar to that of FIG. 3 (step S301 and step S302 to step S309), and sodescription is omitted.

In step S902, the printer 101 determines whether or not the wirelessnetwork 103 is already formed. When it determines that the wirelessnetwork 103 is not yet formed (NO in step S902), the processing advancesto step S903, and when it determines that the wireless network 103 isalready formed (YES in step S902), the processing advances to step S911.

In step S911, the printer 101 determines which of the legacy scheme andthe DPP scheme the QR code image was displayed for when the wirelessnetwork 103 was formed. In the case where a QR code image for the DPPscheme is determined to have been displayed (YES in step S911), theprocessing advances to step S912, and in the case where the QR codeimage for the legacy scheme is determined to have been displayed (NO instep S911), the processing advances to step S913.

In step S912, the printer 101 controls the display unit 204 and displayson the display unit 204 the QR code image for the DPP scheme. Meanwhile,in step S913, the printer 101 controls the display unit 204 and displayson the display unit 204 the QR code image for the legacy scheme.

Note that for the QR code images displayed in step S912 and in stepS913, it is possible to use the same QR code images that were generatedin step S905 and in step S906 when forming the wireless network 103.However, configuration may be taken to generate them newly after thedetermination in step S911. For example, by generating the QR code imageafter the determination in step S911, it ceases to be necessary tocontinue to hold the QR code image after forming the wireless networkand it is possible to reduce the storage capacity.

As described above, by virtue of the second embodiment, the printer 101,in the case where the wireless network 103 has already been formed, theQR code image for the setting scheme used when forming the wirelessnetwork 103 is displayed. Accordingly, without getting confused, theuser of the mobile device 102 can perform communication parametersetting on the mobile device 102 by capturing the one displayed QR codeimage by using the mobile device 102.

Note that here the printer 101 is envisioned to continue to maintain thenetwork 103 formed in accordance with FIG. 5 and FIG. 6 until the powersupply of the printer 101 is turned off. However, configuration may besuch that in the case where the communication with the mobile device 102is not performed for a fixed amount of time, the formation of thenetwork 103 is ended. Note that in a case where an instruction forstarting setting after ending the formation of the network 103, and itis determined that the wireless network 103 has not yet been formed (NOin step S902), the processing advances to step S903.

(Variation)

In the respective embodiments described above, a barcode or atwo-dimensional code may be used rather than a QR code image. Also,instead of displaying an encoded image suitable for reading by acomputer, display in a format (such as ASCII characters) that a user caneasily understand may be performed. The means for reading suchinformation is not limited to a camera for capturing the QR code, and areader apparatus comprising a function for reading various codes may beused.

Also, a case in which wireless LAN communication conforming to the IEEE802.11 series as the wireless communication standard is performed wasdescribed, but there is no limitation to this. For example, a wirelesscommunication medium such as a wireless USB, MBOA, Bluetooth (registeredtrademark), UWB, ZigBee, NFC or the like may be used for implementationthereof. Here, MBOA is an abbreviation of Multi Band OFDM Alliance.Furthermore, in UWB, wireless USB, wireless 1394, WINET, and the likeare included.

Also, a case in which communication parameters for connecting to awireless LAN access point are provided was described, but limitation isnot made thereto. For example, configuration may be taken such thatcommunication parameters for connecting to a Wi-Fi Direct P2P GroupOwner are provided.

Furthermore, while description of a form in which a single wirelessnetwork of the printer 101 is formed in each above-described embodimentwas given, configuration may be taken to form a plurality of wirelessnetworks. For example, configuration may be taken to form two wirelessnetworks: a wireless network that can be connected to by obtaininginformation of a QR code image for the DPP scheme and a wireless networkthat can be connected to by obtaining information of a QR code image forthe legacy scheme.

Also, in the selection screen displayed in step S306/step S706/stepS907, a selection item for displaying both of the two types of QR codeimage may be provided. A screen 400 b illustrated in FIG. 4 is anexample of a selection screen that is displayed on the display unit 204,and on which a “skip” button is provided newly with respect to thescreen 400 a. By the user selecting the “skip” button, two QR codeimages are displayed on the display unit 204. Alternatively,configuration may be taken to automatically display two QR code imageson the display unit 204 in the case where a predetermined amount of timeis waited on the screen 400 a and there was no selection input by theuser.

OTHER EMBODIMENTS

Embodiment(s) of the present invention can also be realized by acomputer of a system or apparatus that reads out and executes computerexecutable instructions (e.g., one or more programs) recorded on astorage medium (which may also be referred to more fully as a‘non-transitory computer-readable storage medium’) to perform thefunctions of one or more of the above-described embodiment(s) and/orthat includes one or more circuits (e.g., application specificintegrated circuit (ASIC)) for performing the functions of one or moreof the above-described embodiment(s), and by a method performed by thecomputer of the system or apparatus by, for example, reading out andexecuting the computer executable instructions from the storage mediumto perform the functions of one or more of the above-describedembodiment(s) and/or controlling the one or more circuits to perform thefunctions of one or more of the above-described embodiment(s). Thecomputer may comprise one or more processors (e.g., central processingunit (CPU), micro processing unit (MPU)) and may include a network ofseparate computers or separate processors to read out and execute thecomputer executable instructions. The computer executable instructionsmay be provided to the computer, for example, from a network or thestorage medium. The storage medium may include, for example, one or moreof a hard disk, a random-access memory (RAM), a read only memory (ROM),a storage of distributed computing systems, an optical disk (such as acompact disc (CD), digital versatile disc (DVD), or Blu-ray Disc (BD)™),a flash memory device, a memory card, and the like.

While the present invention has been described with reference toexemplary embodiments, it is to be understood that the invention is notlimited to the disclosed exemplary embodiments. The scope of thefollowing claims is to be accorded the broadest interpretation so as toencompass all such modifications and equivalent structures andfunctions.

This application claims the benefit of Japanese Patent Application No.2017-246401, filed Dec. 22, 2017 which is hereby incorporated byreference herein in its entirety.

What is claimed is:
 1. A communication apparatus operable to provide acommunication parameter to an external apparatus, comprising: one ormore processors; and one or more memories including instructions that,when executed by the one or more processors, cause the communicationapparatus to: display, based on an operation received from a user, afirst image that is used in a first setting scheme for providing acommunication parameter and in which information including acommunication parameter used for communication is encoded, wherein in acase where the first image is displayed, the external apparatus that hasacquired the communication parameter from the first image establishes acommunication connection using the acquired communication parameter;display, based on the operation received from the user, a second imagethat is used in a second setting scheme for providing a communicationparameter and in which information that does not include thecommunication parameter used for communication and that does include apublic key of the communication apparatus is encoded; in a case wherethe second image is displayed, receive, from the external apparatus thathas acquired the public key by reading the second image, informationabout the acquired public key, and performing an authentication processusing the public key; and in a case where the authentication process issuccessful, provide the communication parameter to the externalapparatus, wherein the external apparatus establishes a communicationconnection using the provided communication parameter.
 2. Thecommunication apparatus according to claim 1, wherein in a case wherethe second image is displayed, the communication apparatus does notprovide the communication parameter to the external apparatus until theauthentication process is successful.
 3. The communication apparatusaccording to claim 1, wherein the second setting scheme is a DeviceProvisioning Protocol (DPP) scheme, and the first setting scheme is ascheme different from the DPP.
 4. The communication apparatus accordingto claim 1, wherein the communication parameter contains settingsnecessary for wireless communication.
 5. The communication apparatusaccording to claim 1, wherein the communication parameter includes anSSID.
 6. The communication apparatus according to claim 1, wherein in acase where the communication apparatus receives information related tothe public key for the communication apparatus and a public key for theexternal apparatus, the authentication process is executed
 7. Thecommunication apparatus according to claim 1, wherein in a case wherethe external apparatus is authenticated by the authentication processusing the received information related to the public key for thecommunication apparatus, the communication parameter is provided byusing a shared key generated using the public key for the externalapparatus and a secret key for the communication apparatus to theexternal apparatus.
 8. The communication apparatus according to claim 7,wherein the communication apparatus provides the communication parameterencrypted by the shared key to the external apparatus.
 9. Thecommunication apparatus according to claim 1, wherein either the firstimage or the second image is displayed based on the operation receivedfrom the user.
 10. The communication apparatus according to claim 1,wherein both the communication parameter included in the informationencoded in the first image and the communication parameter provided ifdisplaying the second image are a parameter for establishing acommunication connection to a same access point.
 11. The communicationapparatus according to claim 1, wherein the communication parameterprovided if displaying the second image is encrypted based on a key usedin the authentication process.
 12. The communication apparatus accordingto claim 1, wherein the communication parameter contained in the firstimage is provided without performing an authentication process.
 13. Thecommunication apparatus according to claim 1, wherein the first imagedoes not contain the public key.
 14. The communication apparatusaccording to claim 1, wherein the first image is displayed based on afirst operation, and the second image is displayed based on a secondoperation.
 15. The communication apparatus according to claim 1, whereinthe communication apparatus is a printer or a digital camera.
 16. Asystem comprising a communication apparatus and an external apparatus,the communication apparatus comprises: one or more processors; and oneor more memories including instructions that, when executed by the oneor more processors, cause the communication apparatus to: display, basedon an operation received from a user, a first image that is used in afirst setting scheme for providing a communication parameter and inwhich information including a communication parameter used forcommunication is encoded; display, based on the operation received fromthe user, a second image that is used in a second setting scheme forproviding a communication parameter and in which information that doesnot include the communication parameter used for communication and thatdoes include a public key of the communication apparatus is encoded; ina case where the second image is displayed, receiving, from the externalapparatus that has acquired the public key by reading the second image,information about the acquired public key, and performing anauthentication process using the public key; in a case where theauthentication process is successful, providing the communicationparameter to the external apparatus, and the external apparatuscomprises: one or more processors; and one or more memories includinginstructions that, when executed by the one or more processors, causethe communication apparatus to: in a case where the first image is read,establishing a communication connection using the communicationparameter acquired from the first image; and in a case where the secondimage is read, performing the authentication process, and establishing acommunication connection using the provided communication parameter. 17.A method for controlling a communication apparatus operable to provide acommunication parameter to an external apparatus, the method comprising:displaying, based on an operation received from a user, a first imagethat is used in a first setting scheme for providing a communicationparameter and in which information including a communication parameterused for communication is encoded, wherein in a case where the firstimage is displayed, an external apparatus that has acquired thecommunication parameter from the first image establishes a communicationconnection using the acquired communication parameter; displaying, basedon the operation received from the user, a second image that is used ina second setting scheme for providing a communication parameter and inwhich information that does not include the communication parameter usedfor communication and that does include a public key of thecommunication apparatus is encoded; in a case where the second image isdisplayed, receiving, from the external apparatus that has acquired thepublic key by reading the second image, information about the acquiredpublic key, and performing an authentication process using the publickey; and in a case where the authentication process is successful,providing the communication parameter to the external apparatus, whereinthe external apparatus establishes a communication connection using theprovided communication parameter.
 18. A non-transitory computer-readablerecording medium storing a program that, when executed by a computer,causes the computer to: display, based on an operation received from auser, a first image that is used in a first setting scheme for providinga communication parameter and in which information including acommunication parameter used for communication is encoded; display,based on the operation received from the user, a second image that isused in a second setting scheme for providing a communication parameterand in which information that does not include the communicationparameter used for communication and that does include a public key ofthe communication apparatus is encoded; in a case where the second imageis displayed, receive, from the external apparatus that has acquired thepublic key by reading the second image, information about the acquiredpublic key, and performing an authentication process using the publickey; and in a case where the authentication process is successful,provide the communication parameter to the external apparatus.